package cn.wolfcode.p2p.base.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;

import cn.wolfcode.p2p.base.domain.IpLog;
import cn.wolfcode.p2p.base.mapper.IpLogMapper;
import cn.wolfcode.p2p.base.query.IpLogQuery;
import cn.wolfcode.p2p.base.service.IIpLogService;

@Service
@Transactional
public class IpLogServiceImpl implements IIpLogService {
    @Autowired
    private IpLogMapper ipLogMapper;
	
	@Transactional(readOnly=true)
	public PageInfo<IpLog> query(IpLogQuery qo) {
		PageHelper.startPage(qo.getCurrentPage(), qo.getPageSize(), qo.getGroupType());
		List<IpLog> list = ipLogMapper.selectList(qo);
		return new PageInfo<IpLog>(list);
	}	
}
